<html>
<head><meta charset="utf-8"><title>Metrics broken again · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html">Metrics broken again</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="219721171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219721171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219721171">(Dec 12 2020 at 18:36)</a>:</h4>
<p>Looks like my hir::Lifetime PR broke something? <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> <a href="https://github.com/rust-analyzer/rust-analyzer/runs/1542577056#step:4:392">https://github.com/rust-analyzer/rust-analyzer/runs/1542577056#step:4:392</a></p>



<a name="219721199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219721199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219721199">(Dec 12 2020 at 18:37)</a>:</h4>
<p>at least it seems this started appearing after that PR got merged</p>



<a name="219722030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219722030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219722030">(Dec 12 2020 at 18:56)</a>:</h4>
<p>Ah I think it because of this part here. My PR changes the number of where predicates but most of the Generics logic only works with the types part of generics directly <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/utils.rs#L191-L244">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/utils.rs#L191-L244</a> and it builds indices based on just those. I believe this might cause the problems here by breaking the index assumptions, but I'm not sure</p>



<a name="219735091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219735091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219735091">(Dec 13 2020 at 00:11)</a>:</h4>
<p>perhaps running <code>rust-analyzer diagnostics .</code> in CI would help catch cases like this?</p>



<a name="219749060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219749060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219749060">(Dec 13 2020 at 07:27)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> the problem with that is that's too slow in debug and too slow to build in release</p>



<a name="219755298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219755298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219755298">(Dec 13 2020 at 10:23)</a>:</h4>
<p>Okay found the "problem line of code", commenting out this line prevents the oob panic <a href="https://github.com/rust-analyzer/rust-analyzer/blob/a15d19619e097b14b670064a4edc054a4251f479/crates/hir_def/src/path/lower.rs#L176">https://github.com/rust-analyzer/rust-analyzer/blob/a15d19619e097b14b670064a4edc054a4251f479/crates/hir_def/src/path/lower.rs#L176</a></p>



<a name="219755926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Metrics%20broken%20again/near/219755926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Metrics.20broken.20again.html#219755926">(Dec 13 2020 at 10:39)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/6852">#6852</a> should fix this by just ignoring lifetime params for now as I'm not sure how substitutions should handle them otherwise.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>